package com.happysmile.ipblock.mybatis.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;


@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Table(name = "ip")
public class Ip {
    /*
    * ip表主键
    * */
    @ApiModelProperty(value = "ip表主键",required = false)
    @JsonIgnore
    @Id
    @Column
    private Long id;

    /*
    * ip地址
    * */
    @ApiModelProperty(value = "ip地址",required = true,example = "192.168.1.1")
    @Column(unique = true,nullable = false)
    private String ip;

    /*
    * 禁用标记,0未禁用.1已禁用
    * */
    @ApiModelProperty(value = "是否禁用",notes = "禁用标记,0未禁用.1已禁用",example = "0")
    @Column(nullable = false)
    private Boolean isBan;

    /*
    * ip地址录入时间
    * */
    @ApiModelProperty(value = "ip地址录入时间",example = "2020-11-11 11:11:11")
    @Column(nullable = false)
    private Date createAt;

    /*
    * 上次修改ip状态时间
    * */
    @ApiModelProperty(value = "上次修改ip状态时间",example = "2020-11-11 11:11:11",required = true)
    @Column(nullable = false)
    private Date modifyAt;

    /*
    * 上次修改ip状态原因
    * */
    @ApiModelProperty(value = "上次修改ip状态原因",example = "增加",required = true)
    @Column(nullable = false)
    private String modify_reason;
}
